﻿@extends('home.inc.common')
@section('title')
		<title>{{$archive->title}} - 图库 - 奇异果聚合</title>
		<meta name="keywords" content="{{$archive->tags()->pluck('name')->implode(',')}}" />
		<meta name="description" content="{{$archive->abstract}}"/>
		<link href="{{asset('home_new/css/newstuhua.css')}}" rel="stylesheet" type="text/css">
		<link href="{{asset('home_new/css/libs.css')}}" rel="stylesheet" type="text/css" />
		<link href="{{asset('home_new/css/global.css')}}" rel="stylesheet" type="text/css" />
		<link href="{{asset('home_new/css/page2.css')}}" rel="stylesheet" type="text/css" />
		<link href="{{asset('home_new/css/page.css')}}" rel="stylesheet" type="text/css" />
		<link href="{{asset('home_new/css/page_article.css')}}" rel="stylesheet" type="text/css" />
		<link href="{{asset('home_new/css/qyg2016.css')}}" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="{{asset('home/js/jquery-3.1.0.min.js')}}"></script>

	<style>
		.index_title .index_titleMain a.plusRecom_title,
		.index_title .index_titleMain a.plusArt_title {
			color: #333;
		}
	</style>
@endsection
@section('content')
		<div class="wrap" style="padding-top:60px;z-index: 999;">
			<div id="main">
				@include('home.inc.gallery_category')

		<div class="pagebg none" style="background:url() no-repeat center top;"></div>
		<div class="pagelogo_tuhua none">
			<a href="{{url('galleries')}}" target="_blank" class="">
				<img src="{{asset('home_new/images/qyg_galleries.png')}}" />
			</a>
		</div>
		<script>
			var _block = 'none';
			if(_block == 'block') {
				$('body').addClass('animate');
			}
		</script>
		<div class="pcanimate" style="display:none"></div>
		<div class="pagemain_content">
			<div class="pagemain_inner">
				<!-- 无背景的时候 pagemain_inner:padding-top:0 -->
				<div class="pagelogo_tuhua block" id="thwubg" style="position:absolute">
					<a href="{{url('galleries')}}" target="_blank" class="">
						<img src="{{asset('home_new/images/qyg_galleries.png')}}" />
					</a>
				</div>
				<!-- baise huangse-->
				<h1 class="hongse" id="share_title">{{$archive->title}}</h1>
				<div class="daoyu_content">
					<b></b>
					<p id="share_intro">{!! $content !!}</p>
				</div>
				<div class="autor_content block">
					<a href="javascript:void(0)" class="acone">
						<b></b>
						<span></span>
					</a>
					<a href="javascript:void(0)" class="actwo">
						<b>图片编辑</b>
						<span>{{$archive->user->nickname}}</span>
					</a>
				</div>
				<input type="hidden" name="qstime" value="649" />
				<div class="mainContent">
					<div class="inner_content">
						<div class="tmpcontent">
							组图上传区域

							<script>
								var imgData = '';
								$(function(){
									var id = "{{$archive->id}}";
									var token = "{{csrf_token()}}";
									$.ajax({
										url:"{{url('ajaxGetImages')}}"+'/'+id,
										type:"post",
										data:{_token:token},
										success:function(data){
											imgData = data;
											//填充图片
											var imgs = [];
											var strs = '';
											var _lengs = imgData.length;
											for(var i = 0;i<_lengs;i++)
											{
												imgs[i] = imgData[i];
											}
											for(var j = 0;j<_lengs;j++)
											{
												strs += '<div class="nofloat_img"><img src="'+imgs[j].url+'/raw.jpg'+'" alt=""><div class="nofloat_bottom"><div class="Num"><span class="currNum">'+(j*1+1)+'</span><span class="totalNum">'+_lengs+'</span></div><p>'+imgs[j].description+'</p></div></div>';
											}
											$('#articleContent').html(strs);
										}
									});
								});
							</script>
						</div>
						<div id="articleContent" class="article">
						</div>
						<a href="http://weibo.com/u/5897732591" target="_blank" rel="nofollow"><img src="{{asset('home_new/images/article_foot_qrcode.jpg')}}" /></a>

						<!-- 评论 开始 -->
						@include('inc.comment')
						<!-- 评论 结束 -->
						<!-- 分享区域 开始 -->
						<div class="shareBox">
							<dl class="shareBnt">
								<dd class="tcwb">
									<a title="" href="#">腾讯微博</a>
								</dd>
								<dd class="qzone">
									<a title="" href="#">QQ空间</a>
								</dd>
								<dd class="pengyou">
									<a title="" href="#">QQ好友</a>
								</dd>
								<dd class="sina">
									<a title="" href="#">新浪微博</a>
								</dd>
							</dl>
						</div>
						<script>
									window._bd_share_config = {
										common : {
											bdText : '{{$archive->title}}',
											bdDesc : '{{$archive->abstract}}',
											bdUrl : window.location.href,
											bdPic : '{{$archive->cover}}'
										},
										share : [{
											"bdSize" : 24
										}]
									}
									with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
								</script>
						<!-- 分享区域 结束 -->
					</div>

				</div>

			</div>

			<!-- 往期回顾 开始 -->
			<script src="{{asset('home_new/js/ued_common.js')}}" type="text/javascript"></script>
			<script src="{{asset('home_new/js/ued_scroll.js')}}" type="text/javascript"></script>
			<div class="lastArea" id="lastArea">
				<div class="wqhgMod" bosszone="reviews">
					<div class="hd">
						<h3 class="fl">往期回顾</h3>
						<a class="more" href="{{url('galleries')}}" target="_blank">更多</a>
					</div>
					<div class="bd">
						<div id="scrWrap1">
							<ul>
								@foreach($lastArea as $v)
								<li class="split">
									<a target="_blank" href="{{route('gallery.show', [$v->id])}}" data-id="$v->id" title="{{$v->title}}"><img class="pic" src="{{route('image', [trim($v->cover, '/'), '229x151'])}}" alt=""><span>{{$v->title}}</span></a>
								</li>
								@endforeach
							</ul>

						</div>

					</div>
				</div>
				<span id="scrLeftBtn1"></span>
				<!--左按钮/上按钮-->
				<span id="scrRightBtn1"></span>
				<!--右按钮/下按钮-->
				<script language="javascript">
					var Scroll = new uedScroll();
					Scroll.scrollContId = "scrWrap1";
					Scroll.scrollSplit = {
						mytag: "li",
						myclass: "split"
					};
					Scroll.arrLeftId = "scrLeftBtn1";
					Scroll.arrRightId = "scrRightBtn1";
					Scroll.sSliceIndex = 1;
					Scroll.sDir = 1;
					Scroll.nStep = 10;
					Scroll.nType = 2;
					Scroll.autoPlay = true;
					Scroll.autoPlayTime = 3;
					Scroll.init();
				</script>
			</div>
</div>
				<!-- 回到顶部 开始 -->
				<a href="javascript:void(0);" onclick="javascript:document.getElementById('lastArea').scrollIntoView()" id="gocomment" title="去评论" style="display:none" >去评论</a>
				<a href="javascript:void(0);" class="scrollTop" id="scrollTop" style="display:none;" title="返回顶部">返回顶部</a>
				<script type="text/javascript" src="{{asset('home_new/js/qfast.js')}}"></script>
				<script type="text/javascript">
					Qfast(true, 'widgets', function() {
						//返回顶部
						K.scrollTop = function() {
							var scrollTop = 0;
							K("scrollTop").bind("click", function() {
								window.scrollTo(0, 0)
							});
							window.onscroll = function() {
								scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
								if(scrollTop < 300) {
									$('#gocomment').css({
										display: "none"
									});
									K("scrollTop").css({
										display: "none"
									});
								} else {
									$('#gocomment').css({
										display: "block"
									});
									K("scrollTop").css({
										display: "block"
									});
								}
							};
							if(K.B.ie6) {
								K("scrollTop").css("position:absolute;");
								window.onscroll = function() {
									scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
									if(scrollTop < 300) {
										$('#gocomment').css({
											display: "none"
										});
										K("scrollTop").css({
											display: "none"
										});
									} else {
										$('#gocomment').css({
											display: "block"
										});
										K("scrollTop").css({
											display: "block"
										});
									}
									K("scrollTop").node.className = K("scrollTop").node.className; //ie6 scroll bug
								}
							}
						};
						//返回顶部
						K.scrollTop();
					});

				</script>
				<!-- 回到顶部 结束 -->
				<script type="text/javascript" src="{{asset('home_new/js/tuhua.js')}}" charset="utf-8"></script>
@endsection